// @ts-ignore
import mockJS from 'mockjs'

export default [
	{
		url: '/mock/home/login',
		method: 'post',
		timeout: 500,
		response: {
			status: 0,
			data: mockJS.mock({
				isLogin: true,
				path: '/home',
				userInfo: {
					name: '敏锅呀',
					header: 'https://himg.bdimg.com/sys/portraitn/item/public.1.cbfe94fd.S1UF4w1wsLaOVJQmRE8Pqg'
				}
			})
		}
	},
	{
		url: '/mock/stable/list',
		method: 'post',
		timeout: 2000,
		response: {
			status: 0,
			data: mockJS.mock({
				'list|1000': [
					{
						// 表示生成不同的中文名
						'name': '@cname',
						// 生成不同的英文名
						'id|+1': 1,
						'birth': '@date',
						'gender': "@pick(['男', '女'])",
						'height|150-200': 100,
						'age|15-80': 0,
						'job': "@pick(['厨师', 'IT农民工', '摸鱼达人', '运动员'])",
						'address': '@county(true)'
					}
				]
			})
		}
	},
	{
		url:  '/mock/api/menueList',
		method: 'post',
		timeout: 800,
		response: {
			status: 0,
			data: mockJS.mock({
				sideBar: [
					{
						key: 'menue1',
						icon: 'home',
						title: '首页',
						children: [
							{
								key: 'home',
								path: '/home',
								title: 'useTable'
							},
							{
								key: 'tree',
								path: '/tree',
								title: '树组件'
							},
							{
								key: 'checkbox',
								path: '/checkbox',
								title: '复选框'
							},
							{
								key: 'el-table',
								path: '/el-table',
								title: 'ElTable'
							},
							{
								key: 'form',
								path: '/form',
								title: 'form'
							},
							{
								key: 'formTable',
								path: '/form-table',
								title: 'FormTable'
							}
						]
					},
					{
						key: 'menue2',
						icon: 'car',
						title: '第二页',
						children: [
							{
								key: 'about',
								path: '/about',
								title: 'Unocss'
							},
							{
								key: 'stable',
								path: '/stable',
								title: 'STable'
							},
							{
								key: 'wangEditor',
								path: '/wangEditor',
								title: 'WangEditor'
							},
							{
								key: 'echart',
								path: '/echart',
								title: 'echart'
							}
						]
					}
				],
				selectValue: [
					{
						value: '11111',
						label: 'Jack'
					},
					{
						value: '2222',
						label: 'Lucy'
					},
					{
						value: '3333',
						label: 'yiminghe'
					}
				]
			})
		}
	}
]
